package com.jnshu.dao;

import com.jnshu.pojo.View;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @ClassName ViewMapper
 * @Descrintion
 * @Author bd
 * @Date 2019/8/3 16:26
 * @Version 1.0
 **/
@Mapper
public interface ViewMapper {
    boolean deleteByPrimaryKey(long courseId);

    int insert(View record);

    int insertSelective(View record);

    View selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(View record);

    int updateByPrimaryKey(View record);

    //    查询阅读量
    long selectCount(long courseId);

    //查询记录
    View selectRecord(@Param("userId") Long userId, @Param("courseId")Long courseId);
}
